3.1.71 \(\int \frac {\cos ^3(a+b x^n)}{x} \, dx\) [71]

Optimal. Leaf size=67 \[ \frac {3 \cos (a) \text {CosIntegral}\left (b x^n\right )}{4 n}+\frac {\cos (3 a) \text {CosIntegral}\left (3 b x^n\right )}{4 n}-\frac {3 \sin (a) \text {Si}\left (b x^n\right )}{4 n}-\frac {\sin (3 a) \text {Si}\left (3 b x^n\right )}{4 n} \]

[Out]

3/4*Ci(b*x^n)*cos(a)/n+1/4*Ci(3*b*x^n)*cos(3*a)/n-3/4*Si(b*x^n)*sin(a)/n-1/4*Si(3*b*x^n)*sin(3*a)/n

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 4, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3507, 3459, 3457, 3456} \begin {gather*} \frac {3 \cos (a) \text {CosIntegral}\left (b x^n\right )}{4 n}+\frac {\cos (3 a) \text {CosIntegral}\left (3 b x^n\right )}{4 n}-\frac {3 \sin (a) \text {Si}\left (b x^n\right )}{4 n}-\frac {\sin (3 a) \text {Si}\left (3 b x^n\right )}{4 n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x^n]^3/x,x]

[Out]

(3*Cos[a]*CosIntegral[b*x^n])/(4*n) + (Cos[3*a]*CosIntegral[3*b*x^n])/(4*n) - (3*Sin[a]*SinIntegral[b*x^n])/(4
*n) - (Sin[3*a]*SinIntegral[3*b*x^n])/(4*n)

Rule 3456

Int[Sin[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[SinIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3457

Int[Cos[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[CosIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3459

Int[Cos[(c_) + (d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Dist[Cos[c], Int[Cos[d*x^n]/x, x], x] - Dist[Sin[c], Int[Si
n[d*x^n]/x, x], x] /; FreeQ[{c, d, n}, x]

Rule 3507

Int[((a_.) + Cos[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_)*((e_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandTrigReduce[(e
*x)^m, (a + b*Cos[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int \frac {\cos ^3\left (a+b x^n\right )}{x} \, dx &=\int \left (\frac {3 \cos \left (a+b x^n\right )}{4 x}+\frac {\cos \left (3 a+3 b x^n\right )}{4 x}\right ) \, dx\\ &=\frac {1}{4} \int \frac {\cos \left (3 a+3 b x^n\right )}{x} \, dx+\frac {3}{4} \int \frac {\cos \left (a+b x^n\right )}{x} \, dx\\ &=\frac {1}{4} (3 \cos (a)) \int \frac {\cos \left (b x^n\right )}{x} \, dx+\frac {1}{4} \cos (3 a) \int \frac {\cos \left (3 b x^n\right )}{x} \, dx-\frac {1}{4} (3 \sin (a)) \int \frac {\sin \left (b x^n\right )}{x} \, dx-\frac {1}{4} \sin (3 a) \int \frac {\sin \left (3 b x^n\right )}{x} \, dx\\ &=\frac {3 \cos (a) \text {Ci}\left (b x^n\right )}{4 n}+\frac {\cos (3 a) \text {Ci}\left (3 b x^n\right )}{4 n}-\frac {3 \sin (a) \text {Si}\left (b x^n\right )}{4 n}-\frac {\sin (3 a) \text {Si}\left (3 b x^n\right )}{4 n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.12, size = 53, normalized size = 0.79 \begin {gather*} \frac {3 \cos (a) \text {CosIntegral}\left (b x^n\right )+\cos (3 a) \text {CosIntegral}\left (3 b x^n\right )-3 \sin (a) \text {Si}\left (b x^n\right )-\sin (3 a) \text {Si}\left (3 b x^n\right )}{4 n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x^n]^3/x,x]

[Out]

(3*Cos[a]*CosIntegral[b*x^n] + Cos[3*a]*CosIntegral[3*b*x^n] - 3*Sin[a]*SinIntegral[b*x^n] - Sin[3*a]*SinInteg
ral[3*b*x^n])/(4*n)

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 52, normalized size = 0.78

method result size
derivativedivides \(\frac {-\frac {\sinIntegral \left (3 b \,x^{n}\right ) \sin \left (3 a \right )}{4}+\frac {\cosineIntegral \left (3 b \,x^{n}\right ) \cos \left (3 a \right )}{4}-\frac {3 \sinIntegral \left (b \,x^{n}\right ) \sin \left (a \right )}{4}+\frac {3 \cosineIntegral \left (b \,x^{n}\right ) \cos \left (a \right )}{4}}{n}\) \(52\)
default \(\frac {-\frac {\sinIntegral \left (3 b \,x^{n}\right ) \sin \left (3 a \right )}{4}+\frac {\cosineIntegral \left (3 b \,x^{n}\right ) \cos \left (3 a \right )}{4}-\frac {3 \sinIntegral \left (b \,x^{n}\right ) \sin \left (a \right )}{4}+\frac {3 \cosineIntegral \left (b \,x^{n}\right ) \cos \left (a \right )}{4}}{n}\) \(52\)
risch \(\frac {i {\mathrm e}^{-3 i a} \pi \,\mathrm {csgn}\left (b \,x^{n}\right )}{8 n}-\frac {i {\mathrm e}^{-3 i a} \sinIntegral \left (3 b \,x^{n}\right )}{4 n}-\frac {{\mathrm e}^{-3 i a} \expIntegral \left (1, -3 i b \,x^{n}\right )}{8 n}+\frac {3 i {\mathrm e}^{-i a} \pi \,\mathrm {csgn}\left (b \,x^{n}\right )}{8 n}-\frac {3 i {\mathrm e}^{-i a} \sinIntegral \left (b \,x^{n}\right )}{4 n}-\frac {3 \,{\mathrm e}^{-i a} \expIntegral \left (1, -i b \,x^{n}\right )}{8 n}-\frac {{\mathrm e}^{3 i a} \expIntegral \left (1, -3 i b \,x^{n}\right )}{8 n}-\frac {3 \,{\mathrm e}^{i a} \expIntegral \left (1, -i b \,x^{n}\right )}{8 n}\) \(149\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a+b*x^n)^3/x,x,method=_RETURNVERBOSE)

[Out]

1/n*(-1/4*Si(3*b*x^n)*sin(3*a)+1/4*Ci(3*b*x^n)*cos(3*a)-3/4*Si(b*x^n)*sin(a)+3/4*Ci(b*x^n)*cos(a))

________________________________________________________________________________________

Maxima [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.51, size = 180, normalized size = 2.69 \begin {gather*} \frac {{\left ({\rm Ei}\left (3 i \, b x^{n}\right ) + {\rm Ei}\left (-3 i \, b x^{n}\right ) + {\rm Ei}\left (3 i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right ) + {\rm Ei}\left (-3 i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right )\right )} \cos \left (3 \, a\right ) + 3 \, {\left ({\rm Ei}\left (i \, b x^{n}\right ) + {\rm Ei}\left (-i \, b x^{n}\right ) + {\rm Ei}\left (i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right ) + {\rm Ei}\left (-i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right )\right )} \cos \left (a\right ) + {\left (i \, {\rm Ei}\left (3 i \, b x^{n}\right ) - i \, {\rm Ei}\left (-3 i \, b x^{n}\right ) + i \, {\rm Ei}\left (3 i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right ) - i \, {\rm Ei}\left (-3 i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right )\right )} \sin \left (3 \, a\right ) - 3 \, {\left (-i \, {\rm Ei}\left (i \, b x^{n}\right ) + i \, {\rm Ei}\left (-i \, b x^{n}\right ) - i \, {\rm Ei}\left (i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right ) + i \, {\rm Ei}\left (-i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right )\right )} \sin \left (a\right )}{16 \, n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*x^n)^3/x,x, algorithm="maxima")

[Out]

1/16*((Ei(3*I*b*x^n) + Ei(-3*I*b*x^n) + Ei(3*I*b*e^(n*conjugate(log(x)))) + Ei(-3*I*b*e^(n*conjugate(log(x))))
)*cos(3*a) + 3*(Ei(I*b*x^n) + Ei(-I*b*x^n) + Ei(I*b*e^(n*conjugate(log(x)))) + Ei(-I*b*e^(n*conjugate(log(x)))
))*cos(a) + (I*Ei(3*I*b*x^n) - I*Ei(-3*I*b*x^n) + I*Ei(3*I*b*e^(n*conjugate(log(x)))) - I*Ei(-3*I*b*e^(n*conju
gate(log(x)))))*sin(3*a) - 3*(-I*Ei(I*b*x^n) + I*Ei(-I*b*x^n) - I*Ei(I*b*e^(n*conjugate(log(x)))) + I*Ei(-I*b*
e^(n*conjugate(log(x)))))*sin(a))/n

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 74, normalized size = 1.10 \begin {gather*} \frac {\cos \left (3 \, a\right ) \operatorname {Ci}\left (3 \, b x^{n}\right ) + 3 \, \cos \left (a\right ) \operatorname {Ci}\left (b x^{n}\right ) + 3 \, \cos \left (a\right ) \operatorname {Ci}\left (-b x^{n}\right ) + \cos \left (3 \, a\right ) \operatorname {Ci}\left (-3 \, b x^{n}\right ) - 2 \, \sin \left (3 \, a\right ) \operatorname {Si}\left (3 \, b x^{n}\right ) - 6 \, \sin \left (a\right ) \operatorname {Si}\left (b x^{n}\right )}{8 \, n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*x^n)^3/x,x, algorithm="fricas")

[Out]

1/8*(cos(3*a)*cos_integral(3*b*x^n) + 3*cos(a)*cos_integral(b*x^n) + 3*cos(a)*cos_integral(-b*x^n) + cos(3*a)*
cos_integral(-3*b*x^n) - 2*sin(3*a)*sin_integral(3*b*x^n) - 6*sin(a)*sin_integral(b*x^n))/n

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cos ^{3}{\left (a + b x^{n} \right )}}{x}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*x**n)**3/x,x)

[Out]

Integral(cos(a + b*x**n)**3/x, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*x^n)^3/x,x, algorithm="giac")

[Out]

integrate(cos(b*x^n + a)^3/x, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\cos \left (a+b\,x^n\right )}^3}{x} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b*x^n)^3/x,x)

[Out]

int(cos(a + b*x^n)^3/x, x)

________________________________________________________________________________________